import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useProductStore = defineStore(
  'product',
  () => {
    // 水老板1号信息
    const slbInfo = ref({})

    // getter
    function getSlbInfo() {
      return this.slbInfo
    }

    // actions
    function setSlbInfo(slb) {
      this.slbInfo = slb
    }

    return {
      slbInfo,
      getSlbInfo,
      setSlbInfo
    }
  },
  {
    persistent: {
      enabled: true,
      storage: sessionStorage
    }
  }
)
